package com.leoman.dao;

import com.leoman.entity.Placard;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * PlacardDao
 * Created by 涂奕恒 on 2016/11/23 0023 下午 3:44.
 */
public interface PlacardDao extends JpaRepository<Placard, Integer>, JpaSpecificationExecutor<Placard> {

    @Query("select a from Placard a where a.isTop = 1")
    Placard iFindOneWithTop();
}